<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .baz {
            color: red;
        }
    </style>
</head>
<body>
<script src="https://unpkg.com/vue@next"></script>
<div id="app">
    <todo-item class="baz"></todo-item>
</div>
<script>
    const vueOpt = {
        data() {
            return {}
        }
    }

    const app = Vue.createApp(vueOpt);
    // 属性继承
    app.component('todo-item', {
        template: `<p :class="$attrs.class">Hi</p>
                    <span>This is a child component</span>
                    `
    });
    app.mount('#app');
</script>
</body>
</html>
